import { defineStore } from "pinia";
import request from "@/lib/request.js";
import { handleRes } from "@/lib/common.js";
const useAppStore = defineStore("app", () => {
  function uniAuth() {
    return new Promise(function (resolve, reject) {
      uni.login({
        complete: (res) => {
          let code = res.code;
          //
          //setCacheTime(LOGIN_KEY,code,5 * 60)
          resolve(code);
        },
      });
    });
  }
  return { uniAuth };
});
export default useAppStore;
